package com.businessportal.web.Test;

import com.businessportal.web.common.DateTimeHelper;
import com.businessportal.web.dataaccess.entities.*;
import com.businessportal.web.dataaccess.services.BlogEntityService;
import com.businessportal.web.dataaccess.services.EventService;
import com.businessportal.web.dataaccess.services.UserService;
import com.businessportal.web.dataaccess.utils.HibernateUtil;
import org.hibernate.Query;
import org.hibernate.Session;

import java.util.Date;
import java.util.List;

/**
 * Created by Vadim on 6/20/14.
 */
public class TestEntity {
    public static void main(String[] args) {

        try {

            Event event = EventService.INSTANCE.getEventById(new Long(3));

            String date = DateTimeHelper.dateFormatForCalendar(event.getEvent_start_date());

            Date tmp = DateTimeHelper.parseDateFromString("04-07-2014 13:12");

           //Login usr = UserService.INSTANCE.AddNewUser("login0", "Password", "Pupkin");
            //Login user = UserService.INSTANCE.CheckLoginPass("login0", "Password");

            //BlogEntity bl = BlogEntityService.INSTANCE.AddNewBlog("test", "test", user);

            //usr = UserService.INSTANCE.AddPhone(usr, "6556556");

            //boolean res = UserService.INSTANCE.CheckLoginPass("test", "pass");

            //res = UserService.INSTANCE.CheckLoginPass("login0", "Password");

            //System.out.println(res);

        } catch (Exception e){

        }
    }
}
